package cn.sinata.wanglin.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

import cn.sinata.wanglin.mine.fragment.VillageActiveListFragment;

/**
 * description：
 * Created by kaihongwu on 2016/12/13 下午 3:32
 */
public class VillageActivePagerAdapter extends FragmentStatePagerAdapter {
    private List<String> mTitles;
    public VillageActivePagerAdapter(FragmentManager fm, List<String> titles) {
        super(fm);
        this.mTitles=titles;
    }

    @Override
    public Fragment getItem(int position) {
        return VillageActiveListFragment.newInstance(position);
    }

    @Override
    public int getCount() {
        return mTitles.size();
    }
    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles.get(position);
    }
}
